import { createRouter, createWebHistory } from 'vue-router'

import Login from "../views/Login";
import Layout from "../layout/Layout";


const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect:"/home",
    children:[{
      path:'home',
      name:'Home',
      component:()=> import("@/views/Home")
    }]
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
